﻿using System;
using Microsoft.Practices.Unity;
using Ymatou.UserAuth.Agent.Login;
using Ymatou.UserAuth.Agent.Token;

namespace Ymatou.UserAuth.Agent
{
    /// <summary>
    /// login agent 
    /// </summary>
    public static class UnityTypeRegistrationLoginAgent
    {
        /// <summary>
        /// 注入登录agent
        /// </summary>
        /// <param name="container"></param>
        public static void RegisterTypes(IUnityContainer container)
        {
            container.RegisterType<IUserLoginAuthAgent, UserLoginAuthAgent>();
        }
    }

    /// <summary>
    /// user token agent
    /// </summary>
    public static class UnityTypeRegistrationUserTokenAgent
    {
        /// <summary>
        /// 注入token
        /// </summary>
        /// <param name="container"></param>
        public static void RegisterTypes(IUnityContainer container)
        {
            container.RegisterType<IUserTokenAgent, UserTokenAgent>();
        }
    }
}
